Curve Error
Curve error is the only geometric style property that doesn't affect the drawing of a shape; instead, it affects the geometric points of the shape's geometry when performing geometric operations, shape type conversions, and shape simplifications. The curve error property determines how far away two points must be for QuickDraw GX to consider them as separate points in these cases:
The sections "Using Curve Error When Converting Paths to Polygons" on page 3-45 and "Using Curve Error When Reducing Shapes" on page 3-49 give examples of using curve error, and the section "Getting and Setting Curve Error" on page 3-114 describes the functions you can use to manipulate this style property.
- Geometric operations. QuickDraw GX guarantees that the results of the geometric operations described in the chapter "Geometric Operations" in this book, such as
GXIntersectShape
orGXUnionShape
, have no two points closer than the value of the curve error of the target shape.- Insetting shapes. A special case of geometric operation, the
GXInsetShape
function, which is described in the chapter "Geometric Operations" in this book, can produce results with an unusually large number of geometric points. Because the inset of a quadratic Bézier curve is not a quadratic Bézier curve itself, multiple insets of tight curve shapes can cause the number of geometric points to grow dramatically. As with the other geometric operations, the result of theGXInsetShape
function has no two consecutive points closer than the value of the curve error of the target shape.- Path to polygon conversions. The curve error also determines the maximum error when converting a path shape to a polygon (for example, with the code
GXSetShapeType
(aPathShape
,gxPolygonType
)). The distance between the original path and the resulting polygon is always less than the value of the curve error. If the curve error is 0, QuickDraw GX performs the path to polygon conversion simply by removing all off-curve control points, which gives a fairly rough approximation.- Shape simplifications. The functions
GXReduceShape
andGXSimplifyShape
, which are described in more detail the chapter "Geometric Operations" in this book, perform a number of simplifications on shapes (for example, removing geometric points unnecessary to the geometry and unwinding crossed contours). In addition to their other simplifications, these functions remove all consecutive (on-curve) geometric points within a distance of less than the curve error.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help